home *** CD-ROM | disk | FTP | other *** search
/ Floppyshop 2 / Floppyshop - 2.zip / Floppyshop - 2.iso / diskmags / 0022-3.564 / dmg-3413 / news.txt / stos3.asc < prev    next >
Text File  |  1989-04-05  |  7KB  |  139 lines

  1.  
  2.                  **************************************
  3.                  *                                    *
  4.                  *  STOS BASIC TUTORIAL - PART THREE  *
  5.                  *  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯  *
  6.                  *                                    *
  7.                  *     Written by Lozian for STEN     *
  8.                  *     ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯     *
  9.                  **************************************
  10.  
  11.  
  12.  Screens drawn with Degas or Degas Elite and saved in Low Resolution are
  13.  given a PI1 extender. Screens saved in Medium Resolution are given a
  14.  PI2 extender. Screens saved in compressed format from Degas or Degas
  15.  Elite will not work with STOS. These screens can be identified by the
  16.  extender PC1 or PC2. Screens saved from the Neochrome art package are
  17.  given a NEO extender.
  18.  
  19.  Plenty of screens exist in the Public Domain in the PI1 format,the PI2
  20.  format and the NEO format,or you can design your own.Other art packages 
  21.  can be used for drawing and some of them have conversion programs to
  22.  convert the screen from the format the package uses to a PI1,PI2 format
  23.  or NEO.
  24.  
  25.  Manipulation of your chosen screen rests entirely with what you have
  26.  on the screen. You can cut a desired part and zoom it to fill the
  27.  screen,or you can change the colours or maybe scroll vertically or
  28.  horizontally, all from within STOS.
  29.  
  30.  To load your screen to STOS, you must first of all reserve some memory
  31.  for it. Enter as a Direct Command i.e. RESERVE AS DATASCREEN 5. This
  32.  will reserve bank number 5 as a PERMANENT bank of memory to load your
  33.  screen into. The difference between Temporary and Permanent banks is
  34.  that Permanent banks and what they contain are saved out when you save
  35.  a STOS.BAS program. A Temporary bank's contents are lost when you
  36.  subsequently save out your program as a BAS file and anything that you
  37.  required in that bank would have to be reloaded from disc.
  38.  
  39.  To load a screen into STOS the following procedure should be adopted.
  40.  Direct Command (If not already done) - RESERVE AS DATASCREEN 5. VERY
  41.  IMPORTANT you do not put this command in the program. It will throw up
  42.  an error every time it is accessed.( BANK 5 ALREADY RESERVED ).
  43.  32K is now reserved for your screen.
  44.  Direct Command - HEXA OFF:LISTBANK ( To view what you have reserved ),
  45.  or use the mouse to point at the key bar and click.
  46.  
  47.  Key in the following program and insert your COPY of STOS.
  48.  
  49.   5 CLS:KEY OFF:MODE 0:FLASH OFF:HIDE:CURS OFF
  50.  10 BACK=LOGIC
  51.  15 LOAD "\STOS\PIC.PI1",5:REM Picture in STOS folder OR choose your own,
  52.                                or load a NEO by changing extender to .NEO.
  53.  20 GET PALETTE (5):REM Gets the correct colours for screen in BANK 5.
  54.  25 APPEAR 5,15:REM Change the 15 to your choice and view the results.
  55.  30 WAIT 250
  56.  
  57.  
  58.  
  59.  
  60.  35 ZOOM 5,15,136,118,177 TO 0,0,319,199:REM Experiment with the       
  61.                                              co-ordinates.
  62.  40 WAIT 250
  63.  45 ZOOM 5,45,96,269,119 TO 0,0,319,199
  64.  50 WAIT 250
  65.  55 ZOOM 5,200,140,290,171, TO 0,0,319,199
  66.  
  67.  Save your program with a BAS extender and next time you load it you
  68.  won't have to RESERVE or load in the screen from disc.
  69.  
  70.  An easy way to find the co-ordinates for the zoom boxes is to load in
  71.  from the accessory disc MOUSE.ACB. (Very handy accessory).
  72.  So Direct Commands ACCNEW:ACCLOAD "MOUSE.ACB" . Press HELP key to view 
  73.  which function key to press (Should be F1) and press function key.
  74.  Accessory will now run and request type of picture to load. Remember
  75.  the PIC.PI1 is in a folder. Load picture and then move mouse. Mouse
  76.  sprite will now indicate posistion of X and Y co-ordinates and these
  77.  can be noted for use in the zoom function and other functions which
  78.  you can read about next time. Any program previously keyed in is still 
  79.  in the memory and you can return to it after using the accessory.
  80.  
  81.  To conserve memory,screens can be compacted with the accessory from
  82.  the disk COMPACT.ACB. Direct command ACCLOAD "COMPACT.ACB". If you
  83.  did not give the command ACCNEW (which removes all accessories),any
  84.  previously loaded accessories will still be available. So if you still
  85.  have the MOUSE.ACB available from function key F1,then COMPACT.ACB will
  86.  be allocated F2. To access COMPACT.ACB press HELP and then F2 or which-
  87.  ever function key it has been allocated to. Observe the screen after
  88.  pressing the HELP key.
  89.  
  90.  The screen will clear and a Menu Bar will show various options. Load
  91.  your required screen and the accessory will compact it for you which
  92.  drastically cuts the memory it will occupy. You will be informed how
  93.  much memory you have saved. Next save the compacted screen to disk as
  94.  a file with a MBK extension. Compacting finished. 
  95.  
  96.  To load back your .MBK file just use the following procedure.
  97.  LOAD "SCREEN1.MBK",5:REM Loads compacted screen into BANK 5.
  98.  Then you can unpck the screen using the UNPACK command.
  99.  BACK=LOGIC:UNPACK 5,BACK:REM Unpacks the screen to appear as the back
  100.  screen and the logic screen together.
  101.  To use the full manipulation procedures of STOS I have found that a
  102.  compacted screen is not so easy to manipulate as an uncompacted one
  103.  but I will leave you to discover what can be done.
  104.  
  105.  Please note that now you have compacted any screen it will require a
  106.  lot less memory and it makes sense to regain any memory reserved in
  107.  a bank for a screen,by the command CLEAR,and then proceed to load in
  108.  the COMPACTED screen as shown above. The COMPACTED screen that now
  109.  loads in,will occupy only the memory it requires. If a BANK is not 
  110.  
  111.  
  112.  
  113.  
  114.  declared as in LOAD "SCREEN1.MBK",8 then BANK 5 will automatically
  115.  become the BANK containing the screen.
  116.  
  117.  Also note that SPRITES use an MBK extender when they are saved,so try
  118.  to give your screens exclusive names e.g. SCREEN8,so that you can then
  119.  differeniate between SPRITES and SCREENS.
  120.  Experiment and have fun and next time we'll try moving the screen in
  121.  various directions.
  122.  
  123.                        COMING IN PART FOUR
  124.                         -------------------
  125.  Srolling left,right,up and down. You name it,STOS can do it if you 
  126.  have got the time and the patience, to wait for the next article.
  127.  Keep experimenting. Feedback appreciated.
  128.  
  129.                                                 (c)  Lozian MCMXC11.
  130.                                                                                                                       Banffshire.
  131.  
  132.  
  133.                                ~~~OOOO~~~
  134.  
  135.  
  136.  
  137.  
  138.  
  139.